package com.twu.biblioteca;

import java.io.Console;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * User: kush jain
 * Date: 6/28/13
 * Time: 4:05 PM
 * To change this template use File | Settings | File Templates.
 */
public class Presenter {

    public static final String seperator = "\t";
    public static final String newLine = "\n";
    public void showWelcomeScreen()
    {
           Presenter.Say(ScreenTexts.getWelcomeMessage());
           Presenter.Say("\nPress Enter to continue...");
           waitForEnterKey();

    }
    public static void  waitForEnterKey()
    {
           try
           {
               System.in.read();
           }
           catch (Exception e)
           {
               e.printStackTrace();
           }

    }

    public void showThankyouScreen()
    {

           Presenter.Say(ScreenTexts.getThankyouMessage());
           Presenter.Say("\nPress Enter to exit...");
           waitForEnterKey();
    }
    public static String getInput(String label)
    {
        Presenter.Say(label);
        Scanner scanner = new Scanner(System.in);
        return scanner.nextLine();
    }

    public String showMenuScreen(){

        Menu libraryMenu = new Menu();
        libraryMenu.setMenuOptions();
        Presenter.Say(libraryMenu.getMenuText());
        return libraryMenu.getChoice(getInput("Enter your choice from the menu above:- "));
    }
    public static void Say(String Text)
    {
        System.out.println("\n" + Text);
    }

}

